package com.monkeys.mapper;

import com.monkeys.pojo.GoodsDemand;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * @author KuangTeam
 */
@Mapper
public interface GoodsDemandMapper {

    //插入数据
    void insert(GoodsDemand goodsDemand);

    //更新数据
    void update(GoodsDemand goodsDemand);

    //删除所有订单信息
    @Delete("delete from goodsdemand")
    void deleteAll();

    //获取所有订单信息
    @Select("select * from goodsdemand")
    List<GoodsDemand> selectAllGoodsDemands();

    //根据id获取订单信息
    @Select("select * from goodsdemand where id = #{goodsDemandId}")
    GoodsDemand getById(Long goodsDemandId);
}
